<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>测量系统</title>
<link href="/stylesheets/survey_public.css" rel="stylesheet" type="text/css" />
<style>
#content{ width:885px; height:437px; float:left; margin-top:19px;}
.js{ width:885px; height:437px;}
.js01{ width:885px; height:335px;}
.js02{ width:885px; height:102px; background:url(/images/user/home/js_03.jpg) repeat-x;}
.js02a{ width:12px; height:13px; padding-left:114px;}
.js02b{ width:885px; height:89px;}
.js02b ul{ width:847px; height:89px; padding-left:38px;}
.js02b ul li{ width:170px; height:78px; padding-right:60px; float:left;}
.js02b ul li.jss{ padding-right:16px; float:left;}
.js02c{ width:12px; height:13px; padding-left:350px;}
.js02d{ width:12px; height:13px; padding-left:580px;}
.js02e{ width:12px; height:13px; padding-left:765px;}

#footer{ width:885px; height:30px; line-height:30px; margin-top:74px; text-align:center; color:#295c72; float:left;}


</style>
<script src="/javascripts/survey.js"></script>
<link type="text/css" href="/javascripts/jquery/themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="/javascripts/jquery/jquery-1.3.2.js"></script>
<script type="text/javascript" src="/javascripts/jquery/ui/ui.core.js"></script>
<script type="text/javascript" src="/javascripts/jquery/ui/ui.dialog.js"></script>

<script>
    $(function() {

		$("#dialog").dialog({
			bgiframe: false,
			autoOpen: false,
			height: 185,
                        width: 300,
			modal: true,
			close: function() {
                                $("#form-message").html("");
				//allFields.val('').removeClass('ui-state-error');
			},
                        buttons: {
				'取消': function() {
                                        $("#form-message").html("");
					$(this).dialog('close');
				},
				'登录': sm
			}
		});

                $('#open-login-form').click(function() {
			$('#dialog').dialog('open');
		})

                /*
                $('#password').keyup(function(e) {
                  if(e.keyCode == 13) {
                      sm();
                  }
                });
                */

	});
  
        var sm = function() {
          $.post('/login/check_login', {
              username: $("#username").val(),
              password: $("#password").val()
          }, function(xml) {
              var result = $(xml).find("hash").find("result").text();
              if(result == "yes"){
                $("#org-name").html($(xml).find("hash").find("name").text());
                $("#dialog").dialog('close');
              }else{
                $("#form-message").html($(xml).find("hash").find("message").text());

              }
          });
        }
</script>
</head>

<body>
<div id="page">
	<div id="header">
		<ol>
		<li><img src="/images/user/home/xinyi_03.jpg" width="380" height="60" /></li>
		</ol>
		<ul>
		<li id="org-name">
                  <%= current_user.name if current_user %>
                </li>
		<li>
                  <a id="open-login-form" href="#">登录</a>&nbsp;&nbsp;
                  <a href="/login/logout">安全退出</a>
                </li>
		</ul>
	</div>
    <div id="content">
   		<div id="a1" class="js">
   			<div class="js01">
    
    		</div>
            <div class="js02">
            	<div class="js02a"><img src="/images/user/home/js3_03.jpg" width="12" height="8" /></div>
            	<div class="js02b">
            		<ul>
            		<li><a href="/user/test/prof_surveys" onmouseover="a(1)"><img src="/images/user/home/nav.jpg" width="170" height="78" /></a></li>
                    <li><a href="/user/reports" onmouseover="a(2)"><img src="/images/user/home/nav-02.jpg" width="170" height="78" /></a></li>
                    <li class="jss"><a href="/user/manuals" onmouseover="a(3)"><img src="/images/user/home/nav-03.jpg" width="170" height="78" /></a></li>
            		<li class="jss"><a href="/user/test/help" onmouseover="a(4)"><img src="/images/user/home/nav-04.jpg" width="170" height="78" /></a></li>
            		</ul>
            	</div>
            </div>
    	</div>
   		<div id="a2" class="js" style="display:none">
        	<div class="js01">
        
         	</div>
            <div class="js02">
                <div class="js02c"><img src="/images/user/home/js3_03.jpg" width="12" height="8" /></div>
                <div class="js02b">
                    <ul>
                    <li><a href="/user/test/prof_surveys" onmouseover="a(1)"><img src="/images/user/home/nav.jpg" width="170" height="78" /></a></li>
                    <li><a href="/user/reports" onmouseover="a(2)"><img src="/images/user/home/nav-02.jpg" width="170" height="78" /></a></li>
                    <li class="jss"><a href="/user/manuals" onmouseover="a(3)"><img src="/images/user/home/nav-03.jpg" width="170" height="78" /></a></li>
                    <li class="jss"><a href="/user/test/help" onmouseover="a(4)"><img src="/images/user/home/nav-04.jpg" width="170" height="78" /></a></li>
                    </ul>
                 </div>
            </div>
    	</div>
        <div id="a3" class="js" style="display:none">
            <div class="js01">
            
            </div>
            <div class="js02">
            	<div class="js02d"><img src="/images/user/home/js3_03.jpg" width="12" height="8" /></div>
            	<div class="js02b">
            		<ul>
            		<li><a href="/user/test/prof_surveys" onmouseover="a(1)"><img src="/images/user/home/nav.jpg" width="170" height="78" /></a></li>
            		<li><a href="/user/reports" onmouseover="a(2)"><img src="/images/user/home/nav-02.jpg" width="170" height="78" /></a></li>
            		<li class="jss"><a href="/user/manuals" onmouseover="a(3)"><img src="/images/user/home/nav-03.jpg" width="170" height="78" /></a></li>
            		<li class="jss"><a href="/user/test/help" onmouseover="a(4)"><img src="/images/user/home/nav-04.jpg" width="170" height="78" /></a></li>
            		</ul>
            	</div>
            </div>
        </div>
        <div id="a4" class="js" style="display:none">
            <div class="js01">
            
            </div>
            <div class="js02">
            	<div class="js02e"><img src="/images/user/home/js3_03.jpg" width="12" height="8" /></div>
            	<div class="js02b">
            		<ul>
            		<li><a href="/user/test/prof_surveys" onmouseover="a(1)"><img src="/images/user/home/nav.jpg" width="170" height="78" /></a></li>
            		<li><a href="/user/reports" onmouseover="a(2)"><img src="/images/user/home/nav-02.jpg" width="170" height="78" /></a></li>
            		<li class="jss"><a href="/user/manuals" onmouseover="a(3)"><img src="/images/user/home/nav-03.jpg" width="170" height="78" /></a></li>
            		<li class="jss"><a href="/user/test/help" onmouseover="a(4)"><img src="/images/user/home/nav-04.jpg" width="170" height="78" /></a></li>
            		</ul>
            	</div>
            </div>
        </div>
    </div>
	<div id="footer">
          北京心嘉源咨询有限公司 CopyRight © www.iyaoi.cn 2009
	</div>

</div>
  <div id="dialog" title="用户登录">
      <form id="login-form">
        <div id="form-message" style="color:red"></div>
        <table>
          <tr height="30">
            <td width="60px"><label for="username">用户名</label></td>
            <td><input type="text" name="username" id="username" style="width:150px;height:25px"  class="text ui-widget-content ui-corner-all" /></td>
          </tr>
          <tr>
            <td><label for="password">密码</label></td>
            <td><input type="password" name="password" id="password" value="" 
                       style="width:150px;height:25px" class="text ui-widget-content ui-corner-all" /></td>
          </tr>
        </table>
        

      </form>
</div>

</body>
</html>


